package panyy.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import panyy.domain.User;

public interface UserMapper {
    @Select("SELECT * FROM USERS WHERE id = #{id}")
    User findById(@Param("id") int id);
    @Insert("INSERT INTO USERS(NAME, AGE) VALUES(#{user.name}, #{user.age})")
    int insert(@Param("user") User user);
}

